package cn.wolfcode.wolf2w.business.service;

import cn.wolfcode.wolf2w.business.api.domain.DestinationEs;
import cn.wolfcode.wolf2w.business.api.domain.NoteEs;
import cn.wolfcode.wolf2w.business.api.domain.StrategyEs;
import cn.wolfcode.wolf2w.business.api.domain.UserEs;
import cn.wolfcode.wolf2w.business.query.SearchQuery;
import org.springframework.data.domain.Page;

import java.lang.reflect.InvocationTargetException;

public interface ISearchService {
    void saveStrategy(StrategyEs strategyEs);

    /**
     * 高亮查询通用接口
     * @param clazz 查询mysql实体
     * @param esClass 查询es实体
     * @param qo 查询参数
     * @param fields 查询字段
     * @return
     * @param <T> 是查询数的mysql实体型,
     */
    <T> Page<T> searchWithHighLight(Class<T> clazz, Class<?> esClass, SearchQuery qo,String...  fields) throws InvocationTargetException, IllegalAccessException;

    void saveNote(NoteEs noteEs);

    void saveUser(UserEs userEs);

    void saveDestination(DestinationEs destinationEs);

}
